import Cookies from 'js-cookie'

const TokenKey = 'Admin-Token'

const isHide = 'isHide'

const ExpiresInKey = 'Admin-Expires-In'

const campusId = 'campusId'

const tenantId = 'tenant_id'

export function getToken() {
    return Cookies.get(TokenKey)
}

export function setToken(token) {
    return Cookies.set(TokenKey, token)
}

export function removeToken() {
    return Cookies.remove(TokenKey)
}

export function getExpiresIn() {
    return Cookies.get(ExpiresInKey) || -1
}

export function setExpiresIn(time) {
    return Cookies.set(ExpiresInKey, time)
}

export function removeExpiresIn() {
    return Cookies.remove(ExpiresInKey)
}
export function getIsHide() {
    return Cookies.get(isHide)
}
export function setIsHide(hide) {
    return Cookies.set(isHide, hide)
}
export function removeIsHide() {
    return Cookies.remove(isHide)
}
export function getCampusId() {
    return Cookies.get(campusId)
}
export function setCampusId(hide) {
    return Cookies.set(campusId, hide)
}
export function removeCampusId() {
    return Cookies.remove(campusId)
}
export function getTenantId() {
    return Cookies.get(tenantId)
}
export function setTenantId(hide) {
    return Cookies.set(tenantId, hide)
}
export function removeTenantId() {
    return Cookies.remove(tenantId)
}